package action.article;

import org.apache.struts2.ServletActionContext;

import service.ArticleService;
import bean.Article;

import com.opensymphony.xwork2.ActionSupport;

public class CheckArticleInfoAction extends ActionSupport {
	private Article article;
	private ArticleService articleService;
	
	@Override
	public String execute() throws Exception {
		article=articleService.getArticleById(article.getId());
		System.out.println(article.getTitle());
		if(article!=null)
			return SUCCESS;
		else
			return "notfound";
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public ArticleService getArticleService() {
		return articleService;
	}

	public void setArticleService(ArticleService articleService) {
		this.articleService = articleService;
	}
	
	
}
